package com.boot.ys.mybatisplus.controller;

import com.boot.ys.mybatisplus.entity.dto.DeptDto;
import com.boot.ys.mybatisplus.result.Result;
import com.boot.ys.mybatisplus.service.DeptService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 杨升
 * @date: 2024-08-26 19:06
 * @Version 1.0
 */

@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;


    @ApiOperation(value = "测试树")
    @GetMapping("/testFuture")
    public Result<List<DeptDto>> futureTask() {

        List<DeptDto> deptDtos = deptService.futureTask();

        return Result.ok(deptDtos);
    }

}
